package cqrtplm.service.impl;

import java.util.*;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.IterUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hustcad.plm.pdm.common.controller.search.CommonSearchController;
import com.hustcad.plm.pdm.common.model.dto.search.SearchColumnDTO;
import com.hustcad.plm.pdm.common.model.dto.search.SearchConditionDTO;
import com.hustcad.plm.pdm.common.model.dto.tableview.TableViewConditionDTO;
import com.hustcad.plm.pdm.common.model.vo.search.ResultEntityVO;
import com.hustcad.plm.pdm.common.model.vo.tableview.TableViewDescriptorVO;
import com.hustcad.plm.pdm.common.service.search.TyplmCommonSearchService;
import com.hustcad.plm.pdm.common.service.tableview.TyplmAdvanceTableViewService;
import com.hustcad.plm.pdm.partbom.dto.ExpandBomTreeByFilterDTO;
import com.hustcad.plm.pdm.partbom.dto.PartBomTree;
import com.hustcad.plm.pdm.partbom.service.TyplmPartBomService;
import com.hustcad.plm.pdm.partbom.vo.PartBomTreeByFilterVO;
import com.ty.basic.response.ResponseResult;
import com.ty.basic.vo.AttributeVO;
import cqrtplm.dto.query.DspfStatusBaseQueryDTO;
import cqrtplm.entity.DspfStatusBase;
import cqrtplm.mapper.DspfStatusBaseMapper;
import cqrtplm.service.IDspfStatusBaseService;
import cqrtplm.vo.DspfStatusBaseVO;
import cqrtplm.vo.EbomInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;

import javax.annotation.Resource;

/**
 * 状态基础Service业务层处理
 *
 * @author 江小雄
 * @date 2025-07-11
 */
@Service
@Slf4j
public class DspfStatusBaseServiceImpl implements IDspfStatusBaseService {
    private static final ObjectMapper mapper = new ObjectMapper();

//    public String jsonTemplate = "{\"typeList\":[{\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"typeOid\":\"320314063445835776\",\"classificationOid\":\"713749472136658944\"}],\"contextList\":[],\"conditionGroups\":[{\"conditionJoint\":\"or\",\"conditions\":[{\"propertyName\":\"productType\",\"propertyValue\":\"111\",\"symbol\":\"=\",\"startTime\":\"\",\"endTime\":\"\",\"constraintInfo\":{\"displayName\":\"机型\",\"propertyType\":\"String\",\"propertyName\":\"productType\",\"attrDefOid\":\"713461366095347712\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"ibaDefOid\":\"709931763698778112\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"typeList\":[{\"typeOid\":\"711986135871700992\",\"typeInthid\":\"ty.inteplm.part.CTyPart|EBOM_NUM\",\"classificationOid\":\"707386470134841344\",\"displayName\":\"EBOM号\",\"classificationDisplayName\":\"产品分类\"}],\"classificationNames\":\"产品分类\",\"ignoreCase\":false,\"empty\":true,\"classification\":true,\"iba\":true},\"displayValueName\":\"\",\"attrDefOid\":\"713461366095347712\",\"propertyType\":\"String\",\"multivalued\":false,\"typeList\":[{\"typeOid\":\"711986135871700992\",\"typeInthid\":\"ty.inteplm.part.CTyPart|EBOM_NUM\",\"classificationOid\":\"707386470134841344\",\"displayName\":\"EBOM号\",\"classificationDisplayName\":\"产品分类\"}],\"ibaDefOid\":\"709931763698778112\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"classificationOid\":\"\",\"ignoreCase\":\"\"},{\"propertyName\":\"devCode\",\"propertyValue\":\"222\",\"symbol\":\"=\",\"startTime\":\"\",\"endTime\":\"\",\"constraintInfo\":{\"displayName\":\"开发令\",\"propertyType\":\"String\",\"propertyName\":\"devCode\",\"attrDefOid\":\"714575555480895488\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"ibaDefOid\":\"709471192789958656\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"typeNames\":\"EBOM号\",\"typeList\":[{\"typeOid\":\"711986135871700992\",\"typeInthid\":\"ty.inteplm.part.CTyPart|EBOM_NUM\",\"classificationOid\":\"707386470134841344\",\"displayName\":\"EBOM号\",\"classificationDisplayName\":\"产品分类\"}],\"ignoreCase\":false,\"empty\":true,\"classification\":false,\"iba\":true},\"displayValueName\":\"\",\"attrDefOid\":\"714575555480895488\",\"propertyType\":\"String\",\"multivalued\":false,\"typeList\":[{\"typeOid\":\"711986135871700992\",\"typeInthid\":\"ty.inteplm.part.CTyPart|EBOM_NUM\",\"classificationOid\":\"707386470134841344\",\"displayName\":\"EBOM号\",\"classificationDisplayName\":\"产品分类\"}],\"ibaDefOid\":\"709471192789958656\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"classificationOid\":\"\",\"ignoreCase\":\"\"}]}],\"keyword\":\"\",\"conditionJoint\":\"and\",\"viewCondition\":null,\"pageNum\":1,\"pageSize\":20,\"columns\":[{\"propertyName\":\"326800246430793728\",\"displayName\":\"PQR编号\",\"ibaDefOid\":\"326800246430793728\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"true\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804191492472832\",\"displayName\":\"WPS编号\",\"ibaDefOid\":\"326804191492472832\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"true\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"objectNumber\",\"displayName\":\"编号\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"187\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"identifier\",\"displayName\":\"标识\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"300\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"enditemName\",\"displayName\":\"成品\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"createstamp\",\"displayName\":\"创建时间\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"150\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"creatorDisplayName\",\"displayName\":\"创建者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"138\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800078067236864\",\"displayName\":\"单双面焊\",\"ibaDefOid\":\"326800078067236864\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816343393599488\",\"displayName\":\"电流速率\",\"ibaDefOid\":\"326816343393599488\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"classification\",\"displayName\":\"分类\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800542410244096\",\"displayName\":\"覆盖厚度\",\"ibaDefOid\":\"326800542410244096\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800157230530560\",\"displayName\":\"覆盖厚度\",\"ibaDefOid\":\"326800157230530560\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"changeState\",\"displayName\":\"更改状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"327096511009964032\",\"displayName\":\"工步编号\",\"ibaDefOid\":\"327096511009964032\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816004074405888\",\"displayName\":\"规格\",\"ibaDefOid\":\"326816004074405888\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804096906723328\",\"displayName\":\"焊材\",\"ibaDefOid\":\"326804096906723328\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799880138031104\",\"displayName\":\"焊材\",\"ibaDefOid\":\"326799880138031104\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800463196618752\",\"displayName\":\"焊材规格\",\"ibaDefOid\":\"326800463196618752\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800199798521856\",\"displayName\":\"焊材级别\",\"ibaDefOid\":\"326800199798521856\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804681080995840\",\"displayName\":\"焊材类型\",\"ibaDefOid\":\"326804681080995840\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800289594376192\",\"displayName\":\"焊材组别\",\"ibaDefOid\":\"326800289594376192\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799970051325952\",\"displayName\":\"焊缝编号\",\"ibaDefOid\":\"326799970051325952\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804289081344000\",\"displayName\":\"焊缝深度为零\",\"ibaDefOid\":\"326804289081344000\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799706670006272\",\"displayName\":\"焊接方式\",\"ibaDefOid\":\"326799706670006272\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800344791416832\",\"displayName\":\"焊接厚度\",\"ibaDefOid\":\"326800344791416832\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799464725774336\",\"displayName\":\"焊接接口类型\",\"ibaDefOid\":\"326799464725774336\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799571483394048\",\"displayName\":\"焊接类型\",\"ibaDefOid\":\"326799571483394048\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804724005502976\",\"displayName\":\"焊接面板\",\"ibaDefOid\":\"326804724005502976\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804600793628672\",\"displayName\":\"焊接面板\",\"ibaDefOid\":\"326804600793628672\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800507027095552\",\"displayName\":\"焊接母材2\",\"ibaDefOid\":\"326800507027095552\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804227261497344\",\"displayName\":\"焊接母材类别\",\"ibaDefOid\":\"326804227261497344\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799922127208448\",\"displayName\":\"焊接母材组别\",\"ibaDefOid\":\"326799922127208448\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816412079521792\",\"displayName\":\"焊接气体体积\",\"ibaDefOid\":\"326816412079521792\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816265169829888\",\"displayName\":\"焊接速率\",\"ibaDefOid\":\"326816265169829888\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"checkoutBy\",\"displayName\":\"检出人\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"generictypeName\",\"displayName\":\"可配置模块\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"collapsibleName\",\"displayName\":\"可折叠\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"sourcekeyName\",\"displayName\":\"来源\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"typeDefName\",\"displayName\":\"类型\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"flowState\",\"displayName\":\"流程状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"securitylabels\",\"displayName\":\"密级\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"description\",\"displayName\":\"描述\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"name\",\"displayName\":\"名称\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"defaultunitkeyName\",\"displayName\":\"默认单位\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799785283846144\",\"displayName\":\"母材1\",\"ibaDefOid\":\"326799785283846144\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799746486534144\",\"displayName\":\"母材标准\",\"ibaDefOid\":\"326799746486534144\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800022777921536\",\"displayName\":\"母材级别\",\"ibaDefOid\":\"326800022777921536\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799510762455040\",\"displayName\":\"坡口类型\",\"ibaDefOid\":\"326799510762455040\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804151470424064\",\"displayName\":\"全焊透\",\"ibaDefOid\":\"326804151470424064\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799833698697216\",\"displayName\":\"热处理\",\"ibaDefOid\":\"326799833698697216\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"contextName\",\"displayName\":\"上下文\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"lifecycletemplateName\",\"displayName\":\"生命周期模版\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"thumbnailFile\",\"displayName\":\"缩略图\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"ownerDisplayName\",\"displayName\":\"所有者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"typeIcon\",\"displayName\":\"图形标识\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"50\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"phantomName\",\"displayName\":\"虚拟制造件\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800407596924928\",\"displayName\":\"有无补强圈\",\"ibaDefOid\":\"326800407596924928\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"parttypekeyName\",\"displayName\":\"装配模式\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"lifecyclestagekeyName\",\"displayName\":\"状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"modifystamp\",\"displayName\":\"最后修改时间\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"150\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"updatorDisplayName\",\"displayName\":\"最后修改者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"100\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false}],\"needThumbnailFile\":true,\"needCount\":false}";
    public String jsonTemplate = "{\"typeList\":[{\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"typeOid\":\"320314063445835776\",\"classificationOid\":\"720079190965993472\",\"classificationDisplayName\":\"Y-发电机\"}],\"contextList\":[],\"conditionGroups\":[{\"conditionJoint\":\"and\",\"conditions\":[{\"keyDate\":1754272740162,\"propertyName\":\"productType\",\"propertyValue\":\"机型test\",\"symbol\":\"=\",\"symbolList\":[{\"label\":\"=\",\"value\":\"=\"},{\"label\":\"!=\",\"value\":\"!=\"}],\"startTime\":\"\",\"endTime\":\"\",\"constraintInfo\":{\"displayName\":\"机型\",\"propertyType\":\"String\",\"propertyName\":\"productType\",\"attrDefOid\":\"717365468879732736\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"ibaDefOid\":\"709931763698778112\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"typeNames\":\"零部件\",\"typeList\":[{\"typeOid\":\"320314063445835776\",\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"classificationOid\":\"720079190965993472\",\"displayName\":\"零部件\",\"classificationDisplayName\":\"Y-发电机\"}],\"ignoreCase\":false,\"classification\":false,\"iba\":true,\"empty\":true},\"displayValueName\":\"\",\"copyPropertyName\":\"productType\",\"attrDefOid\":\"717365468879732736\",\"propertyType\":\"String\",\"multivalued\":false,\"typeList\":[{\"typeOid\":\"320314063445835776\",\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"classificationOid\":\"720079190965993472\",\"displayName\":\"零部件\",\"classificationDisplayName\":\"Y-发电机\"}],\"ibaDefOid\":\"709931763698778112\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"classificationOid\":\"\",\"ignoreCase\":\"\"},{\"keyDate\":1754272742226,\"propertyName\":\"devCode\",\"propertyValue\":\"开发令test\",\"symbol\":\"=\",\"symbolList\":[{\"label\":\"=\",\"value\":\"=\"},{\"label\":\"!=\",\"value\":\"!=\"}],\"startTime\":\"\",\"endTime\":\"\",\"constraintInfo\":{\"displayName\":\"开发令\",\"propertyType\":\"String\",\"propertyName\":\"devCode\",\"attrDefOid\":\"717365521346281472\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"ibaDefOid\":\"709471192789958656\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"typeNames\":\"零部件\",\"typeList\":[{\"typeOid\":\"320314063445835776\",\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"classificationOid\":\"720079190965993472\",\"displayName\":\"零部件\",\"classificationDisplayName\":\"Y-发电机\"}],\"ignoreCase\":false,\"classification\":false,\"iba\":true,\"empty\":true},\"displayValueName\":\"\",\"copyPropertyName\":\"devCode\",\"attrDefOid\":\"717365521346281472\",\"propertyType\":\"String\",\"multivalued\":false,\"typeList\":[{\"typeOid\":\"320314063445835776\",\"typeInthid\":\"ty.inteplm.part.CTyPart\",\"classificationOid\":\"720079190965993472\",\"displayName\":\"零部件\",\"classificationDisplayName\":\"Y-发电机\"}],\"ibaDefOid\":\"709471192789958656\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"attrDefOtype\":\"ty.inteplm.attribute.CTyAttributeDefMap\",\"classificationOid\":\"\",\"ignoreCase\":\"\"}]}],\"keyword\":\"\",\"conditionJoint\":\"and\",\"viewCondition\":null,\"pageNum\":1,\"pageSize\":20,\"columns\":[{\"propertyName\":\"326800246430793728\",\"displayName\":\"PQR编号\",\"ibaDefOid\":\"326800246430793728\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"true\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804191492472832\",\"displayName\":\"WPS编号\",\"ibaDefOid\":\"326804191492472832\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"true\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"objectNumber\",\"displayName\":\"编号\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"257\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"identifier\",\"displayName\":\"标识\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"470\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"enditemName\",\"displayName\":\"成品\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"createstamp\",\"displayName\":\"创建时间\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"150\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"creatorDisplayName\",\"displayName\":\"创建者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"138\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800078067236864\",\"displayName\":\"单双面焊\",\"ibaDefOid\":\"326800078067236864\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816343393599488\",\"displayName\":\"电流速率\",\"ibaDefOid\":\"326816343393599488\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"classification\",\"displayName\":\"分类\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800542410244096\",\"displayName\":\"覆盖厚度\",\"ibaDefOid\":\"326800542410244096\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800157230530560\",\"displayName\":\"覆盖厚度\",\"ibaDefOid\":\"326800157230530560\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"changeState\",\"displayName\":\"更改状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"327096511009964032\",\"displayName\":\"工步编号\",\"ibaDefOid\":\"327096511009964032\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816004074405888\",\"displayName\":\"规格\",\"ibaDefOid\":\"326816004074405888\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804096906723328\",\"displayName\":\"焊材\",\"ibaDefOid\":\"326804096906723328\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799880138031104\",\"displayName\":\"焊材\",\"ibaDefOid\":\"326799880138031104\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800463196618752\",\"displayName\":\"焊材规格\",\"ibaDefOid\":\"326800463196618752\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800199798521856\",\"displayName\":\"焊材级别\",\"ibaDefOid\":\"326800199798521856\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804681080995840\",\"displayName\":\"焊材类型\",\"ibaDefOid\":\"326804681080995840\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800289594376192\",\"displayName\":\"焊材组别\",\"ibaDefOid\":\"326800289594376192\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799970051325952\",\"displayName\":\"焊缝编号\",\"ibaDefOid\":\"326799970051325952\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804289081344000\",\"displayName\":\"焊缝深度为零\",\"ibaDefOid\":\"326804289081344000\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799706670006272\",\"displayName\":\"焊接方式\",\"ibaDefOid\":\"326799706670006272\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800344791416832\",\"displayName\":\"焊接厚度\",\"ibaDefOid\":\"326800344791416832\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799464725774336\",\"displayName\":\"焊接接口类型\",\"ibaDefOid\":\"326799464725774336\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799571483394048\",\"displayName\":\"焊接类型\",\"ibaDefOid\":\"326799571483394048\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804724005502976\",\"displayName\":\"焊接面板\",\"ibaDefOid\":\"326804724005502976\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804600793628672\",\"displayName\":\"焊接面板\",\"ibaDefOid\":\"326804600793628672\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800507027095552\",\"displayName\":\"焊接母材2\",\"ibaDefOid\":\"326800507027095552\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804227261497344\",\"displayName\":\"焊接母材类别\",\"ibaDefOid\":\"326804227261497344\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799922127208448\",\"displayName\":\"焊接母材组别\",\"ibaDefOid\":\"326799922127208448\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816412079521792\",\"displayName\":\"焊接气体体积\",\"ibaDefOid\":\"326816412079521792\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326816265169829888\",\"displayName\":\"焊接速率\",\"ibaDefOid\":\"326816265169829888\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"checkoutBy\",\"displayName\":\"检出人\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"generictypeName\",\"displayName\":\"可配置模块\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"collapsibleName\",\"displayName\":\"可折叠\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"sourcekeyName\",\"displayName\":\"来源\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"typeDefName\",\"displayName\":\"类型\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"flowState\",\"displayName\":\"流程状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"securitylabels\",\"displayName\":\"密级\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"description\",\"displayName\":\"描述\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"name\",\"displayName\":\"名称\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"defaultunitkeyName\",\"displayName\":\"默认单位\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799785283846144\",\"displayName\":\"母材1\",\"ibaDefOid\":\"326799785283846144\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799746486534144\",\"displayName\":\"母材标准\",\"ibaDefOid\":\"326799746486534144\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800022777921536\",\"displayName\":\"母材级别\",\"ibaDefOid\":\"326800022777921536\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799510762455040\",\"displayName\":\"坡口类型\",\"ibaDefOid\":\"326799510762455040\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326804151470424064\",\"displayName\":\"全焊透\",\"ibaDefOid\":\"326804151470424064\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326799833698697216\",\"displayName\":\"热处理\",\"ibaDefOid\":\"326799833698697216\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"contextName\",\"displayName\":\"上下文\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"lifecycletemplateName\",\"displayName\":\"生命周期模版\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"thumbnailFile\",\"displayName\":\"缩略图\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"ownerDisplayName\",\"displayName\":\"所有者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"typeIcon\",\"displayName\":\"图形标识\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"50\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"phantomName\",\"displayName\":\"虚拟制造件\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"326800407596924928\",\"displayName\":\"有无补强圈\",\"ibaDefOid\":\"326800407596924928\",\"ibaDefOtype\":\"ty.inteplm.attribute.CTyStringDef\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"parttypekeyName\",\"displayName\":\"装配模式\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"120\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"lifecyclestagekeyName\",\"displayName\":\"状态\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"80\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"modifystamp\",\"displayName\":\"最后修改时间\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"150\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false},{\"propertyName\":\"updatorDisplayName\",\"displayName\":\"最后修改者\",\"masterProperty\":false,\"fixed\":\"\",\"width\":\"100\",\"sortable\":false,\"fieldList\":[],\"virtual\":false,\"foreignColumnMaster\":false,\"canNotRemove\":false,\"enum\":false}],\"needThumbnailFile\":true,\"needCount\":false}";
    public String jsonTemplateEbom = "{\"expandLevel\":1,\"giveUsesOccurrence\":\"N\",\"isQueryIBA\":true,\"isApplyRoot\":false,\"conditions\":[{\"view\":\"Design\",\"lifecycleStateKey\":\"\",\"expandCondition\":\"latest\",\"date\":\"\",\"baseLineOid\":\"\",\"purposeOfBom\":\"\",\"spareBom\":\"\"}],\"isFilterAttr\":false,\"attrFilterCondition\":[],\"ibaColumns\":[\"REMARK\",\"Version\",\"Material\",\"Weight\",\"3DDrawingNumber\",\"ReferenceDrawingNumber\",\"devCode\",\"设计衍生\",\"Off\",\"Quality\",\"DedicatedSuppliers\",\"Remark\",\"CertificationRequire\",\"TestRequire\",\"NeedBatch\",\"SFBatch\",\"MadeVietnam\",\"HalfBOM\",\"ModelMachine\",\"SegmNum\",\"ManufacturingAttr\",\"step_no\",\"steptype\",\"specification\",\"Value\",\"Schematic Part\",\"PCB Footprint\",\"Library_Ref\",\"DataSheet\",\"FootPrint_Ref\",\"Library_Path\",\"FootPrint_Path\",\"Voltage\",\"Tolerance\",\"Power\",\"150062\",\"123\",\"1232\",\"150054\",\"181409\",\"110542\",\"150001\",\"150005\",\"150009\",\"150002\",\"150004\",\"150008\",\"150011\",\"150012\",\"150013\",\"150006\",\"150007\",\"151869\",\"productType\",\"关联零部件\"],\"isNestedTree\":false,\"isNeedTranEnum\":true,\"isQuerySubstitutionStatus\":true,\"fatherOid\":\"714530181097570304\",\"fatherOtype\":\"ty.inteplm.part.CTyPart\",\"fatherNumber\":\"part202507130908431872476\",\"filterMode\":0,\"needExpandParts\":[]}";

    @Autowired
    private DspfStatusBaseMapper dspfStatusBaseMapper;
    @Autowired
    private TyplmCommonSearchService typlmCommonSearchService;
    @Resource
    private TyplmPartBomService typlmPartBomService;
    @Resource
    private TyplmAdvanceTableViewService typlmAdvanceTableViewService;
    @Resource
    private CommonSearchController commonSearchController;

    /**
     * 查询状态基础
     *
     * @param statusid 状态基础主键
     * @return 状态基础
     */
    @Override
    public DspfStatusBase selectDspfStatusBaseByStatusid(String statusid) {
        return dspfStatusBaseMapper.selectDspfStatusBaseByStatusid(statusid);
    }

    /**
     * 查询状态基础列表
     *
     * @param dspfStatusBase 状态基础
     * @return 状态基础
     */
    @Override
    public List<DspfStatusBase> selectDspfStatusBaseList(DspfStatusBase dspfStatusBase) {
        return dspfStatusBaseMapper.selectDspfStatusBaseList(dspfStatusBase);
    }

    /**
     * 新增状态基础
     *
     * @param dspfStatusBase 状态基础
     * @return 结果
     */
    @Override
    public int insertDspfStatusBase(DspfStatusBase dspfStatusBase) {
        return dspfStatusBaseMapper.insertDspfStatusBase(dspfStatusBase);
    }

    /**
     * 修改状态基础
     *
     * @param dspfStatusBase 状态基础
     * @return 结果
     */
    @Override
    public int updateDspfStatusBase(DspfStatusBase dspfStatusBase) {
        return dspfStatusBaseMapper.updateDspfStatusBase(dspfStatusBase);
    }

    /**
     * 批量删除状态基础
     *
     * @param statusids 需要删除的状态基础主键
     * @return 结果
     */
    @Override
    public int deleteDspfStatusBaseByStatusids(String[] statusids) {
        return dspfStatusBaseMapper.deleteDspfStatusBaseByStatusids(statusids);
    }

    /**
     * 删除状态基础信息
     *
     * @param statusid 状态基础主键
     * @return 结果
     */
    @Override
    public int deleteDspfStatusBaseByStatusid(String statusid) {
        return dspfStatusBaseMapper.deleteDspfStatusBaseByStatusid(statusid);
    }

    @Override
    public PageInfo<DspfStatusBaseVO> selectPageList(DspfStatusBaseQueryDTO queryDTO, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<DspfStatusBaseVO> list = dspfStatusBaseMapper.selectPageList(queryDTO);
        return new PageInfo<DspfStatusBaseVO>(list);
    }

    @Override
    public PageInfo<DspfStatusBaseVO> queryByConditionForPage(DspfStatusBaseQueryDTO queryDTO)
            throws JsonProcessingException {
        /*
        * EBOM列表查询逻辑
        *   1.根据开发令查询EBOM列表及扩展属性（开发令必须唯一）
        *   2.将查询出的扩展属性封装后返回前端
        * */
        List<DspfStatusBaseVO> reList = new ArrayList<>();
        List<Map<String,Object>> list = dspfStatusBaseMapper.getEBOMOidByDevCode(queryDTO);
        if(IterUtil.isNotEmpty(list)){
            list.stream().forEach(i->{
                List<AttributeVO> ibaAttrs = dspfStatusBaseMapper.getEBOMListByOid(i.get("EBOMOID").toString());
                if(IterUtil.isNotEmpty(ibaAttrs)){
                    Map<String, String> mapIba = this.extractAttributes(ibaAttrs);
                    DspfStatusBaseVO dspfStatusBaseVO = new DspfStatusBaseVO(mapIba,i,queryDTO);
                    reList.add(dspfStatusBaseVO);
                }
            });

        }

//        SearchConditionDTO searchConditionDTO = JSONUtil.toBean(jsonTemplate, SearchConditionDTO.class);
//        String s = JSONUtil.toJsonStr(searchConditionDTO);
//
//        ResponseResult<PageInfo<ResultEntityVO>> pageInfoResponseResult = commonSearchController
//                .queryByConditionForPage(searchConditionDTO);
//
//        //将获取到的EBOM数据转换封装给前端
//        List<ResultEntityVO> list = pageInfoResponseResult.getData().getList();
//        List<DspfStatusBaseVO> reList = new ArrayList<>();
//        if(IterUtil.isNotEmpty(list)){
//            list.stream().forEach(i->{
//                List<AttributeVO> ibaAttrs = i.getIbaAttrs();
//                if(IterUtil.isNotEmpty(ibaAttrs)){
//                    Map<String, String> map = this.extractAttributes(ibaAttrs);
//                    DspfStatusBaseVO dspfStatusBaseVO = new DspfStatusBaseVO(map,i);
//                    reList.add(dspfStatusBaseVO);
//                }
//            });
//        }
        PageInfo<DspfStatusBaseVO> pageInfo = new PageInfo<>();
        pageInfo.setList(reList);
        return pageInfo;
    }

    @Override
    public PageInfo<EbomInfoVO> getEbomInfo(DspfStatusBaseQueryDTO queryDTO) throws JsonProcessingException {
        // 将JSON字符串转换为JsonNode对象
        JsonNode rootNode = mapper.readTree(jsonTemplateEbom);
        // 转换为ObjectNode以便修改
        ObjectNode rootObject = (ObjectNode) rootNode;
        // 2. 替换参数
        rootObject.put("fatherOid", queryDTO.getFatherOid());
        rootObject.put("fatherOtype", queryDTO.getFatherOtype());
        rootObject.put("fatherNumber", queryDTO.getFatherNumber());
        // 将修改后的JsonNode转换回JSON字符串
        String jsonStr = mapper.writeValueAsString(rootObject);
        ExpandBomTreeByFilterDTO expandBomTreeByFilterDTO = JSONUtil.toBean(jsonStr, ExpandBomTreeByFilterDTO.class);
        //获取底层EBOM搭建信息
        PartBomTreeByFilterVO partBomTreeByFilterVO = this.typlmPartBomService.expandBomTreeByFilterNew(
                expandBomTreeByFilterDTO, true);
        //获取底层EBOM扩展属性信息
        TableViewConditionDTO conditionDTO = new TableViewConditionDTO();
        conditionDTO.setTableid("tree_usage_view");
        TableViewDescriptorVO userDefaultTableView = this.typlmAdvanceTableViewService.getUserDefaultTableView(
                conditionDTO);
        List<EbomInfoVO> list = this.getEbomInfoList(partBomTreeByFilterVO,userDefaultTableView);
        PageInfo<EbomInfoVO> ebomInfoVOPageInfo = new PageInfo<>();
        ebomInfoVOPageInfo.setList(list);
        return ebomInfoVOPageInfo;
    }

    /**
     * 根据EBOM搭建信息与扩展属性信息封装前端显示数据
     * @param partBomTreeByFilterVO
     * @param userDefaultTableView
     * @return
     */
    private List<EbomInfoVO> getEbomInfoList(PartBomTreeByFilterVO partBomTreeByFilterVO, TableViewDescriptorVO userDefaultTableView) {


        List<EbomInfoVO> list = new ArrayList<>();
        List<PartBomTree> partBomTreeList = partBomTreeByFilterVO.getPartBomTreeList();
        if(IterUtil.isNotEmpty(partBomTreeList)){
            partBomTreeList.stream().forEach(i->{
                Map<String, List<String>> partIbaAttributeMap = i.getPartIbaAttributeMap();
                Map<String,String> map = this.extractAttributesEbom(partIbaAttributeMap,userDefaultTableView);

                EbomInfoVO ebomInfoVO = new EbomInfoVO(i,map);
                list.add(ebomInfoVO);
            });
        }

        return list;
    }

    /**
     * 提取EBOM扩展属性
     * @param partIbaAttributeMap
     * @param userDefaultTableView
     * @return
     */
    private Map<String, String> extractAttributesEbom(Map<String, List<String>> partIbaAttributeMap, TableViewDescriptorVO userDefaultTableView) {

        Map<String, String> map = new HashMap<>();

        if(MapUtil.isNotEmpty(partIbaAttributeMap)){
            partIbaAttributeMap.forEach((k,v)->{
                List<SearchColumnDTO> searchColumnList = userDefaultTableView.getSearchColumnList();
                if(IterUtil.isNotEmpty(searchColumnList)){
                    Optional<SearchColumnDTO> matchedColumn = searchColumnList.stream()
                            .filter(column -> k.equals(column.getPropertyName()))
                            .findFirst();
                    if (matchedColumn.isPresent()) {
//                        String displayName = matchedColumn.get().getDisplayName();
                        String ibaEnName = matchedColumn.get().getIbaEnName();
                        map.put(ibaEnName,v.get(0));
                    }else {
                        log.info("未找到匹配的 propertyName: " + k);
                    }
                    //        else {
                    //            throw RTErrorCodeEnum.PROJECT_EXCE_ERROR.getException("未找到匹配的 propertyName: " + targetPropertyName);
                    //        }
                }else {
                    log.info("EBOM【searchColumnList】扩展属性为空！");
                }
            });
        }else {
            log.info("EBOM【partIbaAttributeMap】扩展属性为空！");
        }

        return map;
    }

    /**
     * 提取高级搜索扩展属性
     * @param ibaAttrs
     * @return
     */
    public static Map<String, String> extractAttributes(List<AttributeVO> ibaAttrs) {
        Map<String, String> result = new HashMap<>();
        if (ibaAttrs != null) {
            for (AttributeVO attr : ibaAttrs) {
                result.put(attr.getAttributeEnName(), attr.getAttributeValue());
            }
        }
        return result;
    }

}
